from comment.utils.Serializers import BaseListSerializer

class  BankCardListSerializer(BaseListSerializer):
    '''
     银行卡列表数据 序列化的类
    :param BaseListSerializer:
    :return:
    '''
    def to_dict(self):
        lst = []
        for card in self.data_list:
            lst = (
                {
                    'cardId':card.bankInfoId,
                    'cardNum':card.bankCardNum,
                    'bankName':card.openingBank
                }
            )
        return lst
